import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/message/user-message-by-type',
    method: 'get',
    params
  })
}

export function getTypeList(params) {
  return request({
    url: '/message/user-message-type',
    method: 'get',
    params
  })
}

export function read(data) {
  return request({
    url: '/message/message-read',
    method: 'post',
    data
  })
}

export function allRead(data) {
  return request({
    url: '/message/message-all-read',
    method: 'put',
    data
  })
}

export function del(data) {
  return request({
    url: '/message/remove/'+data,
    method: 'delete',
    data
  })
}